#! /usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) JoinQuant Development Team
# Author: Huayong Kuang <kuanghuayong@joinquant.com>

import argparse

main = argparse.ArgumentParser()
subparser = main.add_subparsers().add_parser('test')

for p in [main,subparser]:
   p.add_argument('--arg', action='store_true')

#print main.parse_args('--arg test'.split()).arg
#print main.parse_args('test --arg'.split()).arg

args = main.parse_args()

print(vars(args))
